<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/17 0017
 * Time: 上午 9:00
 */
Route::namespace('Xcx')->middleware(['validate'])->group(function (){
    Route::post('login','AuthController@login');
    Route::get('test','AuthController@test');
    Route::get('kefu','KefuController@validate');
    Route::get('craftsman/map','CraftsmanController@map');
    Route::get('/newinfo/{id}','KefuController@newinfo');
    Route::get('/news','KefuController@news');
});
Route::namespace('Xcx')->middleware(['validate','xcx.auth'])->group(function (){
    Route::get('info','UserController@info');
    Route::put('info','UserController@store');
    //实名认证信息提交
    Route::put('auth','UserController@auth');
    //选择注册类型
    Route::post('type','UserController@type');
    //获取优秀班组列表
    Route::get('craftsman','CraftsmanController@index');
    Route::get('info/{id}','CraftsmanController@read');
    Route::post('craftsman','CraftsmanController@store');
    Route::get('craftsman/info','CraftsmanController@info');
    Route::put('changeState','UserController@state');
    Route::post('changeState','UserController@stated');
//  Route::get('craftsman/map','CraftsmanController@map');
    Route::post('craftsman/update','CraftsmanController@update');
    //项目端注册与历史浏览与详细信息
    Route::post('register','UserController@create');//项目端注册接口
    Route::get('project','ProjectController@project');//当前所有审核过的项目列表
    Route::get('projectinfo/{id}','ProjectController@projectinfo');//当前浏览的项目的详细信息
    Route::get('liulanbz','ProjectController@liulanbz'); //已经浏览过的项目信息列表
    Route::get('xmgz','ProjectController@xmgz');//项目负责人，电话，项目名称
    //班组的招工信息与历史浏览及详细信息
    Route::post('needwork','XmgzController@store'); //项目招工 
    Route::get('works','WorkController@works');
    Route::get('workinfo/{id}','WorkController@workinfo');
    Route::get('liulan','WorkController@liulan');//浏览的班组记录
    //公告列表
    Route::get('notices','XmgzController@show'); //显示所有公告
    Route::get('mywork','XmgzController@select');//我发布的招工;
    // Route::get('news','XmgzController@news');//新闻
});